import {messages, queryCurrencyPrecision} from "share/common";
import React from 'react'
import { connect } from 'react-redux'
import moment from 'moment'
import trafficLineImg from 'images/request/travel/traffic_line.png'
import emptyAvatarImg from 'images/request/travel/empty.avatar.jpg'
import planeImg from 'images/request/travel/plane.png'
import trainImg from 'images/request/travel/train.png'
import hotelImg from 'images/request/travel/hotel.png'
import otherImg from 'images/request/travel/other.png'
import remarkImg from 'images/request/travel/remark.png'
import subsidyImg from 'images/request/travel/subsidy.png'
import disabledImg from 'images/request/travel/disabled.png'
import disabledEnImg from 'images/request/travel/disabled-en.png'
import didiImg from 'images/travel/didi.png'
import carImg from 'images/travel/car.png'
import ctripImg from 'images/travel/ctrip.png'
import diningImg from 'images/dining.png';
import { Form, Collapse, Tag, Spin, Row, Col, Tooltip, Icon, Divider, Button, Popover } from 'antd'
const Panel = Collapse.Panel;

import thirdConsumptionService from 'containers/third-consumption/third-consumption.service'
import requestService from 'containers/request/request.service'
import 'styles/request/travel-request/travel-information.scss'
import TravelOrderList from 'containers/request/travel-request/travel-order-list'
import TravelBookBtn from 'containers/request/travel-request/travel-book-btn'
import ZxRecommend from "./travel-slide/zx-recommend";
import ZxRecommendConfirm from "./travel-slide/zx-recommend-confirm";
import SlideFrame from 'components/slide-frame';
import config from "config";
import cautionFilled from 'images/caution_filled.png';
import traffic_line from 'images/request/travel/traffic_line.png';
import travelUtil from "./travelUtil";

class TravelInformation extends React.Component{
  constructor(props) {
    super(props);
    this.state = {
      loading: false,
      itinerary: [], //行程
      subsidyVersion: 2, //差补版本（第二版、第三版）
      isShowZxRecommend: false, //显示推荐页面
      isShowZxRecommendConfirm: false, //显示推荐确认页面
      ticketIssuedFail: false, //
      failedList: [], //验价失败的订单列表
      selectedTickets: [], //重新选择的订单列表
      targetFlightForUpd: null //修改航班的航班信息 {item, index}
    };
  }

  componentDidMount() {
    this.getSubsidyVersion()
    this.getZhenxuanUrl();
  }

  getItinerary = () => {
    //FLIGHT(机票)、TRAIN(火车)、SUBSIDIES(差补)、REMARK(行程备注)、OTHER(其他交通)、HOTEL(酒店) + OFFLINE_HOTEL(非TMC酒店)
    const { applicationOID, latestApplicationOID } = this.props;
    requestService[latestApplicationOID ? 'getLastItineraryByApplicationOID' : 'getItineraryByApplicationOID'](applicationOID, latestApplicationOID).then(res => {
      const resData = res.data;
      if (this.state.subsidyVersion === 2) {
        const info = this.props.info;
        resData.SUBSIDIES = JSON.parse((info.travelApplication && info.travelApplication.travelSubsidies) || '[]');
      }
      let itinerary = {};
      const uniqueItineraryKeys = ['FLIGHT', 'HOTEL', 'TRAIN'];
      uniqueItineraryKeys.map(key => {
        const theVal = resData[key];
        if (theVal) {
          itinerary[key] = theVal;
        }
      });
      Object.keys(resData).map(key => {
        //manageType不为1002的如果有机票信息，会多一个flightticket行程类型，中控不展示
        if (key !== 'FLIGHTTICKET' && !itinerary[key]) {
          itinerary[key] = resData[key]
        }
      });
      const flight = itinerary['FLIGHT'] ? itinerary['FLIGHT'] : [];
      let ticketIssuedFail = false;
      let failedList = [];
      flight && flight.map(f => {
        const {meiyaFlightOrderDetails} = f;
        meiyaFlightOrderDetails && meiyaFlightOrderDetails.map(mfo => {
          if (mfo.subOrderStatus === '30') { // 订单状态为：30验价失败
            ticketIssuedFail = true;
            failedList.push(Object.assign({}, mfo, {
              orderBufferType: f.orderBufferType,
              orderBuffer: f.orderBuffer,
              customerOrderId: f.approvalNum,
              isIntFlight: f.isIntFlight, //是否国际机票
              internationalOrderBufferType: f.internationalOrderBufferType,
              internationalOrderBuffer: f.internationalOrderBuffer
            }));
          }
        })
      })
      const offlineHotel = itinerary['OFFLINE_HOTEL'] || [];
      const airline = itinerary['NO_TMC_AIRLINE'] || [];
      const urban = itinerary['URBAN_TRAFFIC'] || [];
      const water = itinerary['WATER_TRAFFIC'] || [];
      const subsidy = itinerary['SUBSIDIES'] || [];
      itinerary.otherItinerarys = [
        ...airline.map((item, idx) => ({...item, itineraryKey: 'airline', itineraryName: messages('mcd.cus.airline'/*非TMC机票*/), idx})),
        ...offlineHotel.map((item, idx) => ({...item, itineraryKey: 'offlineHotel', itineraryName: messages('mcd.cus.hotel'/*非TMC酒店*/), idx})),
        ...urban.map((item, idx) => ({...item, itineraryKey: 'urban', itineraryName: messages('mcd.cus.city.traffic'/*市内交通*/), idx})),
        ...water.map((item, idx) => ({...item, itineraryKey: 'water', itineraryName: messages('mcd.cus.amphibious'/*水陆客运*/), idx})),
        ...subsidy.map((item, idx) => ({...item, itineraryKey: 'subsidy', itineraryName: messages('request.key413'/*差补*/), idx}))
      ];
      this.setState({
        loading: false,
        itinerary,
        ticketIssuedFail,
        failedList
      })
    })
  };

  //获取差补的版本
  getSubsidyVersion = () => {
    this.setState({ loading: true });
    this.setState({ subsidyVersion: (this.props.info.travelApplication && this.props.info.travelApplication.travelSubsidies) ? 2 : 3 },() => {
      this.getItinerary()
    })
  };

  //获取星期几
  getWeed = (value) => {
    switch(value) {
      case 0:
        return messages('request.key33'/*周日*/);
      case 1:
        return messages('request.key34'/*周一*/);
      case 2:
        return messages('request.key35'/*周二*/);
      case 3:
        return messages('request.key36'/*周三*/);
      case 4:
        return messages('request.key37'/*周四*/);
      case 5:
        return messages('request.key38'/*周五*/);
      case 6:
        return messages('request.key39'/*周六*/);
    }
  };

  //获取天数差
  getDifferDays = (sDate, eDate) => {
    sDate = new Date(new Date(sDate).format('yyyy-MM-dd'));
    eDate = new Date(new Date(eDate).format('yyyy-MM-dd'));
    return Math.abs(Math.floor((eDate - sDate)/1000/60/60/24)) + 1
  };

  getIfValidDuring = (sDate, eDate) => {
    return new Date(sDate).getTime() <= new Date(eDate).getTime();
  };

  //格式化money
  renderMoney = (value) => {
    let numberString = Number(value || 0).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
    numberString += (numberString.indexOf('.') > -1 ? '' : '.00');
    return numberString
  };

  //展示差补详情列表
  handleSubsidyItemShow = (travelSubsidiesRequestOID, itemIndex, showItem) => {
    let itinerary = this.state.itinerary;
    itinerary['SUBSIDIES'].map(item => {
      if (item.travelSubsidiesRequestOID === travelSubsidiesRequestOID) {
        item.travelSubsidiesRequestItemDTOs[itemIndex].showItem = showItem
      }
    });
    this.setState({ itinerary })
  };

  getDiDiType = (approvalType) => {
    if (approvalType === 1) {
      return messages('request.key478')/*差旅用车*/;
    }
    if (approvalType === 2) {
      return messages('request.key479')/*按次数用车*/;
    }
    if (approvalType === 3) {
      return messages('request.key480')/*按日期用车*/;
    }
    if (approvalType === 4) {
      return messages('request.key588')/*马上用车*/;
    }
    if (approvalType === 5) {
      return messages('request.key589')/*接送机／火车*/;
    }
    return null;
  };

  hideAndShow = (key) => {
    let { itinerary } = this.state;
    if (window.ISIE9) {
      itinerary[key].show = !itinerary[key].show;
      this.setState({itinerary});
    }
  };

  goToZxRecommend = (e, item) => {
    this.setState({
      isShowZxRecommend: true,
      targetFlightForUpd: null
    });
  }

  setZxRecommendClose = (result) => {
    console.log('=====setZxRecommendClose=====')
    this.setState({
      isShowZxRecommend: false,
      targetFlightForUpd: null
    });
  }

  afterZxRecommendClose = (params) => {
    console.log('=====afterZxRecommendClose=====', params)
    const {selectedTickets, targetFlightForUpd} = this.state;
    const isShowZxRecommendConfirm = !!params;
    this.setState({
      isShowZxRecommend: false,
      isShowZxRecommendConfirm,
      targetFlightForUpd: null,
      selectedTickets: targetFlightForUpd ? Object.assign(selectedTickets, params) : params
    });
  }

  setZxRecommendCloseConfirm = () => {
    console.log('=====setZxRecommendCloseConfirm=====')
    this.setState({
      isShowZxRecommendConfirm: false,
      selectedTickets: []
    });
  }

  /**
   * 确认推荐页面，点击底部按钮后触发
   * @param params "0"-确认预定  "1"-重新选择  "2"-返回  "3"-修改航班
   * @param item,index params为"3"时，item为修改航班信息
   * @returns {*}
   */
  afterZxRecommendCloseConfirm = (params) => {
    console.log('=====afterZxRecommendCloseConfirm=====', params);
    const {flag, item, index} = params || {};
    let {selectedTickets, targetFlightForUpd} = this.state;
    if (flag !== '3') {
      selectedTickets = [];
      targetFlightForUpd = null;
    } else {
      targetFlightForUpd = {item, index};
    }
    this.setState({
      isShowZxRecommendConfirm: false,
      selectedTickets,
      isShowZxRecommend: flag === '1' || flag === '3',
      targetFlightForUpd
    }, () => {
      flag === '0' && this.getItinerary(); // 点击"确认"后，刷新行程信息
    });
  }

  //是否展示订票平台相关文案
  isShowPlatformBooking = () => {
    const { itinerary } = this.state;
    let isShow = false;
    itinerary['FLIGHT'] && itinerary['FLIGHT'].map(flight => {
      if (flight.supplierPlatFormEnable) {
        isShow = true;
      }
    });
    return isShow;
  };

  //是否展示机票统一订票相关文案
  isShowFlightBooking = () => {
    const { itinerary } = this.state;
    let isShow = false;
    itinerary['FLIGHT'] && itinerary['FLIGHT'].map(flight => {
      if (!flight.supplierPlatFormEnable) {
        isShow = true;
      }
    });
    return isShow;
  };

  //跳转甄选机票订单详情
  handleRefundZx = (approvalNum, vendorCode) => {
    // const zxHost = config.zxHosts[location.host] || config.zxHost;
    // const zxUrl = sessionStorage.setItem(`hly.zx.${vendorCode}`);
    const zxUrl = this.state[`${vendorCode}Url`];
    const realmId = config.realmIds[location.host] || config.realmId;
    const { authToken: {access_token} } = this.props;
    const url = `${zxUrl}&access_token=${access_token}&pageType=orderDetail&realmId=${realmId}&customerOrderId=${approvalNum}&language=zh&newWindowFlag=Y`;
    console.log(url)
    window.open(url);
  };

  getZhenxuanUrl = () => {
    const { user, company } = this.props;
    thirdConsumptionService.getThirdConsumptionList(user.employeeID, company.companyOID).then(res => {
      const list = res.data;
      list.map((ven) => {
        ven.venItems.map(item => {
          const {loginUrl} = item;
          thirdConsumptionService.thirdConsumptionLogin(loginUrl).then((res) => {
            const resUrl = res.data.url;
            if (resUrl.indexOf('vendorCode=airPlane') > -1) { //甄选机票PC链接
              this.setState({
                airPlaneUrl: resUrl
              });
            } else if (resUrl.indexOf('vendorCode=hotel') > -1) { //甄选酒店PC链接
              this.setState({
                hotelUrl: resUrl
              });
            }
          });
        });
      });
    });
  };

  renderItineraryItem = (key, item) => {
    const { customFormPropertyMap, controlFields, info, isPreVersion, language, isReadOnly, user, company, approving } = this.props;
    const { subsidyVersion, itinerary, ticketIssuedFail } = this.state;
    // task#43232：审批列表-已审批-申请单详情，隐藏超buffer推荐机票
    // let hideRecommend = info.status === 1003 && (user.userOID !== info.applicantOID);
    const hideRecommend = ~location.pathname.indexOf('approve-request-detail') && approving !== 'true';
    let header = '';
    let itemContent = null;
    let sDate = info.travelApplication ? info.travelApplication.startDate : '';
    let standardEnable = customFormPropertyMap['ca.travel.applypolicy.enable'] === 'true';
    const baseCcy = company.baseCurrency;
    switch(key) {
      case 'AUTO_FLIGHT':
      case 'FLIGHT':
        header = ( <div>
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}>
              <img src={planeImg}/>
              {key === 'FLIGHT' && messages('setting.key1855'/*TMC机票*/)}
              {key === 'AUTO_FLIGHT' && messages('request.key542')/*智能机票*/}
            </Col>
            {key === 'FLIGHT' && info.travelApplication && (
              <Col span={15}>
                {info.travelApplication.uniformBooking && info.travelApplication.bookingClerkName && this.isShowFlightBooking() && (
                  <span>{messages('request.key463',{arg1: info.travelApplication.bookingClerkName}/*由 {arg1} 统一订机票*/)}</span>
                )}
                {info.travelApplication.uniformBooking && info.travelApplication.bookingClerkName &&
                  info.travelApplication.platformBookingClerkName && this.isShowPlatformBooking() &&
                  this.isShowFlightBooking() && (
                  <span>&nbsp;|&nbsp;</span>
                )}
                {info.travelApplication.platformBookingClerkName && this.isShowPlatformBooking() && (
                  <span>{messages('request.key604',{arg1:info.travelApplication.platformBookingClerkName})/*订票平台机票由{arg1}统一订票*/}</span>
                )}
              </Col>
            )}
            {key === 'AUTO_FLIGHT' && (
              <Col span={10}>{messages('request.key543')/*授权订票后，由智能订票统一订票*/}</Col>
            )}
          </Row>
          {!hideRecommend && ticketIssuedFail && <Row className="recommend-enter">
            <div className="note-content">
              <span className="note-content-spn"><img src={cautionFilled} className="img"/></span>
              {messages('zx.recommend.note'/*该申请单内机票价格已涨价，您可查看推荐航班，预定推荐航班免审批*/)}
              <Button type="primary" className="recommend-enter-btn" onClick={(e) => this.goToZxRecommend(e, item)}>
                {messages('zx.recommend.query'/*点击查看推荐航班*/)}
              </Button>
            </div>
          </Row>}
          </div>
        );
        if (item) {
          let details = [];
          let time = '';
          const {beyondStandardItems, beyondStandardReason} = item || {};
          if (customFormPropertyMap['ca.travel.applypolicy.enable'] === 'false' || !customFormPropertyMap['ca.travel.applypolicy.enable']) {
            controlFields.discount.show && details.push(item.discount ?
              `${item.discount}${messages('request.key326'/*折*/)}` :
              messages('request.key327'/*所有折扣*/));
            controlFields.seatClass.show && details.push(item.seatClass ? item.seatClass : messages('request.key328'/*所有舱位*/));
          }
          controlFields.ticketPrice.show && details.push(item.ticketPrice ?
            `${this.props.company.baseCurrency} ${this.renderMoney(item.ticketPrice)}` :
            messages('request.key329'/*不限制*/));
          if (controlFields.takeOffBeginTime.show && controlFields.takeOffEndTime.show) {
            time = `${messages('request.key57'/*起飞时间*/)}：
            ${item.takeOffBeginTime ? 
              `${item.takeOffBeginTime} ～ ${item.takeOffEndTime || messages('request.key330'/*无限制*/)}` : 
              messages('request.key331'/*全部时间段*/)}`;
          }
          const meiyaFlightOrderDetails = item.meiyaFlightOrderDetails;
          const meiyaFlightOrderDetailsLen = meiyaFlightOrderDetails && meiyaFlightOrderDetails.length;
          let airlineArr = [];
          let realEndDate;
          if(meiyaFlightOrderDetailsLen) {
            meiyaFlightOrderDetails.map(order => {
              const {journeys} = order;
              journeys && journeys.map((item, i) => {
                const {departureCityName, arrivalCityName} = item;
                const lastCity = airlineArr[airlineArr.length - 1];
                if (i === 0) {
                  departureCityName !== arrivalCityName && airlineArr.push(arrivalCityName);
                } else {
                  departureCityName !== lastCity && airlineArr.push(departureCityName);
                  arrivalCityName !== lastCity && airlineArr.push(arrivalCityName);
                }
              });
              airlineArr.pop();

              if(order.return) { //获取返程日期
                realEndDate = journeys[journeys.length - 1].arrivalDate.replace(/-/g, '/');
              }
            })
          }
          const airlineStr = airlineArr.join(', ');
          itemContent = (
            <div className="flight">
              {(info.version > 0 || isPreVersion) && item.disabled && (
                <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
              )}
              <div>
                {
                  this.getIfValidDuring(sDate,item.startDate) && <Tag color="#4B8DFF">
                    {messages('request.key464',{arg1: this.getDifferDays(sDate,item.startDate)}/*第 {arg1} 天*/)}
                    {!!realEndDate && <span>{' ～ '}
                      {messages('request.key464',{arg1: this.getDifferDays(sDate,realEndDate)}/*第 {arg1} 天*/)}</span>}
                  </Tag>
                }
                <span className="date">
                  {new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())}
                  {!!realEndDate && <span>
                    {' ～ '}
                    {new Date(realEndDate).format('yyyy.MM.dd')} {this.getWeed(new Date(realEndDate).getDay())}
                  </span>}
                </span>
                {false && item.supplierName && <div className="supplier"><span>{item.supplierName}</span> <img src={item.supplierIconUrl}/></div>}
              </div>
              <Row className="location">
                <Col span={10}>
                  <span className="from">{item.fromCity ? item.fromCity : messages('request.key490')/*不限*/}</span>

                  <span className="line-wrapper">
                    <img src={trafficLineImg}/>
                    <span className="line-str">
                      <Popover placement="topLeft" content={airlineStr}>{airlineStr}</Popover>
                    </span>
                  </span>
                  <span className="to">{item.toCity ? item.toCity : messages('request.key490')/*不限*/}</span>
                </Col>
                {item.approvalNum && <Col span={10}>{messages('request.key334'/*行程单号*/)}：{item.approvalNum}</Col>}
                {!isReadOnly && (
                  <Col span={4} style={{textAlign: 'right'}}>
                    <TravelBookBtn itinerary={item} type="flight"/>
                  </Col>
                )}
                {
                  meiyaFlightOrderDetailsLen &&
                  <Col span={4} className="detail-tag">
                    <Button type="primary" size="small" className="detail-btn" onClick={() => this.handleRefundZx(item.approvalNum, 'airPlane')}>{messages('dashboard.key128')/*查看详情*/}</Button>
                  </Col>
                }
              </Row>
              <Row>
                <Col span={10}>
                  {details.map((detail, index) => {
                    if (index !== details.length - 1) {
                      return <span key={index}>{detail}<span className="ant-divider"/></span>
                    } else {
                      return detail
                    }
                  })}
                </Col>
                <Col span={10}>{time}</Col>
              </Row>
              {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}

              {beyondStandardReason && <Row className="standard-exceed">
                {beyondStandardItems && beyondStandardItems.length > 0 && <div className="title">{beyondStandardItems.join(', ')}</div>}
                {beyondStandardReason && <div>{messages('zx.exceed.reason'/*理由*/)}：{beyondStandardReason}</div>}
              </Row>}
              {item.flightOrderDetails && item.flightOrderDetails.length > 0 && <TravelOrderList orderList={item.flightOrderDetails} type="flight" itinerary={item}/>}
              {meiyaFlightOrderDetails && <TravelOrderList orderList={meiyaFlightOrderDetails} type="flight" itinerary={item}/>}
            </div>
          )
        }
        break;
      case 'TRAIN':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={trainImg}/>{messages('request.key335'/*火车*/)}</Col>
            {info.travelApplication && info.travelApplication.trainUniformBooking && info.travelApplication.trainBookingClerkName && (
              <Col span={10}>{messages('request.key465',{arg1: info.travelApplication.trainBookingClerkName}/*由 {arg1} 统一订火车票*/)}</Col>
            )}
          </Row>
        );
        if (item) {
          let details = [];
          controlFields.seatClass.show && details.push(item.seatClass ? item.seatClass : messages('request.key329'/*不限制*/));
          controlFields.ticketPrice.show && details.push(item.ticketPrice ? `${this.props.company.baseCurrency} ${this.renderMoney(item.ticketPrice)}` :
            messages('request.key329'/*不限制*/));
          itemContent = (
            <div className="train">
              {(info.version > 0 || isPreVersion) && item.disabled && (
                <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
              )}
              <div>
                <Tag color="#4B8DFF">{messages('request.key464',{arg1: this.getDifferDays(sDate,item.startDate)}/*第 {arg1} 天*/)}</Tag>
                <span className="date">{new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())}</span>
                {item.supplierName && <div className="supplier"><span>{item.supplierName}</span> <img src={item.supplierIconUrl}/></div>}
              </div>
              <Row className="location">
                <Col span={10}>
                  <span className="from">{item.fromCity ? item.fromCity : messages('request.key490')/*不限*/}</span>
                  <img src={trafficLineImg}/>
                  <span className="to">{item.toCity ? item.toCity : messages('request.key490')/*不限*/}</span>
                </Col>
                {item.approvalNum && <Col span={10}>{messages('request.key334'/*行程单号*/)}：{item.approvalNum}</Col>}
                {!isReadOnly && (
                  <Col span={4} style={{textAlign: 'right'}}>
                    <TravelBookBtn itinerary={item} type="train"/>
                  </Col>
                )}
              </Row>
              <div>
                {false && details.map((detail, index) => {
                  if (index !== details.length - 1) {
                    return <span key={index}>{detail}<span className="ant-divider"/></span>
                  } else {
                    return detail
                  }
                })}
              </div>
              {
                item.taxTotalAmount && <Row>
                  <div>
                    <span className="other-label">{messages('mcd.total.tax.amt')}</span>：
                    <span className="other-value">{item.currency} {this.filterMoney(item.taxTotalAmount, queryCurrencyPrecision(item.currency))}&nbsp;&nbsp;</span>
                    {
                      (item.currency && item.currency !== baseCcy) && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{item.actualCurrencyRate && item.actualCurrencyRate.toFixed(2)} {baseCcy} {this.filterMoney(item.baseCurrencyAmount, baseCcy)}
                      </span>
                    }
                  </div>
                </Row>
              }
              {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
              <TravelOrderList orderList={item.trainOrderInfoList} type="train"/>
            </div>
          )
        }
        break;
      case 'SUBSIDIES 111':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={subsidyImg}/>{messages('request.key336'/*差补*/)}</Col>
          </Row>
        );
        if (item && subsidyVersion === 2) {
          itemContent = (
            <div className="subsidy">
              {(info.version > 0 || isPreVersion) && item.disabled && (
                <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
              )}
              <div>
                <Tag color="#4B8DFF">
                  { messages('request.key464',{arg1: this.getDifferDays(sDate,item.startDate)}/*第 {arg1} 天*/)}
                  {' ～ '}
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.endDate)}/*第 {arg1} 天*/)}
                </Tag>
                <span className="date">
                  {new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())} ～ {new Date(item.endDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.endDate).getDay())}
                </span>
              </div>
              <Row className="location">
                <Col span={10}>{messages('request.key337'/*目的地*/)}：<span className="from">{item.cityName ? item.cityName : (
                    <span style={{color: '#d4d4d4'}}>{messages('request.key555')/*通用城市*/}</span>
                  )}</span></Col>
                <Col span={10}>{messages('request.key9'/*总金额*/)}：
                  <span className="amount">{this.props.company.baseCurrency} {this.renderMoney(item.totalAmount || 0)}</span>
                </Col>
              </Row>
              {item.expenseType && item.expenseType.length ? (
                item.expenseType.map(expense => {
                  return (
                    <div key={expense.expenseTypeOID} className="expense-item">
                      <div>
                        {expense.expenseTypeName} {this.props.company.baseCurrency} {expense.amount}{messages('request.key338'/*/人/天*/)},
                        {expense.usernames.length}{messages('request.key339'/*人*/)},
                        {messages('request.key461',{arg1: this.getDifferDays(item.startDate,item.endDate)}/*共{arg1}天*/)}
                      </div>
                      <div>{expense.usernames.join(', ')}</div>
                    </div>
                  )
                })
              ) : <div>{messages('request.key340'/*该城市无差补*/)}</div>}
              {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
            </div>
          )
        } else if (item && subsidyVersion === 3) {
          let otherCurrency = [];
          itemContent = (
            <div className="subsidy">
              {(info.version > 0 || isPreVersion) && item.disabled && (
                <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
              )}
              <div>
                <Tag color="#4B8DFF">
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.startDate)}/*第 {arg1} 天*/)}
                  {' ～ '}
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.endDate)}/*第 {arg1} 天*/)}
                </Tag>
                <span className="date">
                  {new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())} ～ {new Date(item.endDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.endDate).getDay())}
                </span>
              </div>
              <div className="location-and-amount">
                {item.cityName} {item.baseCurrency} {this.filterMoney(item.totalBaseCurrencyAmount, queryCurrencyPrecision(item.baseCurrency), true)}
                <span className="other-currency">
                  {Object.keys(item.currencyCodeAmountMap || {}).length > 1 && Object.keys(item.currencyCodeAmountMap).map(currency => {
                    otherCurrency.push(`${currency} ${this.filterMoney(item.currencyCodeAmountMap[currency], queryCurrencyPrecision(currency), true)}`)
                  })}
                  {otherCurrency.join(' + ')}
                </span>
              </div>
              {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
              {(item.travelSubsidiesRequestItemDTOs || []).map((subsidy, itemIndex) => {
                let expenseTypeAmount = [];
                let subsidyItemIndex = 0;
                let subCurrency = [];
                Object.keys(subsidy.currencyCodeAmountMap || {}).map(currency => {
                  subCurrency.push(`${currency} ${this.filterMoney(subsidy.currencyCodeAmountMap[currency], queryCurrencyPrecision(currency), true)}`)
                });
                return (
                  <div className="user-subsidy-items" key={itemIndex}>
                    <Row className="title-show">
                      <Col span={5} className="avatar-info">
                        <Row>
                          <Col span={5}><img src={subsidy.avatar || emptyAvatarImg} className="avatar-img"/></Col>
                          <Col span={19} style={{wordWrap:'break-word'}}>{subsidy.fullName}</Col>
                        </Row>
                      </Col>
                      <Col span={17} className="user-total-info">
                        {subCurrency.length && <Tooltip placement="top" title={subCurrency.join(' + ')}>{subCurrency.join(' + ')}</Tooltip>}
                        <div>{subsidy.baseCurrencyCode} {this.filterMoney(subsidy.baseCurrencyAmount, queryCurrencyPrecision(subsidy.baseCurrencyCode), true)}</div>
                        <div className="expense-type-amount">
                          {Object.keys(subsidy.expenseTypeAmountMap || {}).map(key => {
                            expenseTypeAmount.push(`${key}: ${this.filterMoney(subsidy.expenseTypeAmountMap[key], queryCurrencyPrecision(), true)}`)
                          })}
                          <Tooltip placement="top" title={expenseTypeAmount.join('，')}>{expenseTypeAmount.join('，')}</Tooltip>
                        </div>
                      </Col>
                      <Col span={2} className="up-down-icon">
                        <Icon type={subsidy.showItem ? 'up-circle-o' : 'down-circle-o'}
                              onClick={() => this.handleSubsidyItemShow(item.travelSubsidiesRequestOID, itemIndex, !subsidy.showItem)}/>
                      </Col>
                    </Row>
                    {subsidy.showItem && subsidy.travelSubsidiesItemMap.map(subsidiesItem => {
                      return subsidiesItem.travelSubsidiesRequestItemDetailDTOs.map(subsidyItem => {
                        subsidyItemIndex ++;
                        return (
                          <div className={`subsidy-item ${subsidyItemIndex % 2 ? 'subsidy-item-bg' : ''}`} key={subsidyItem.travelSubsidiesDetailsOID}>
                            <Row>
                              <Col span={3}>{moment(subsidiesItem.subsidiesDate).format('YYYY-MM-DD')}</Col>
                              <Col span={13}>
                                <Tooltip placement="topLeft" title={subsidyItem.expenseTypeName}>
                                  <span className="expense-type-name">{subsidyItem.expenseTypeName}</span>
                                </Tooltip>
                                {(subsidy.duplicateSubsidiesOIDs || []).map(duplicateOID => {
                                  if (duplicateOID === subsidyItem.travelSubsidiesDetailsOID) {
                                    return <Tag color="#bababa" style={{verticalAlign:'top'}}>{messages('request.key341'/*重复*/)}</Tag>
                                  }
                                })}
                                <div>
                                  {messages('request.key342'/*企业汇率*/)}：{Number(subsidyItem.baseCurrencyRate).toFixed(2)}
                                  {subsidyItem.currencyRate - subsidyItem.baseCurrencyRate >= 0 ? ' + ' : ' - '}
                                  {(subsidyItem.currencyRate - subsidyItem.baseCurrencyRate).toFixed(2) * 100}%
                                  ，{messages('request.key343'/*原金额*/)}：{this.filterMoney(subsidyItem.baseAmount, queryCurrencyPrecision(subsidyItem.currencyCode), true)}
                                </div>
                              </Col>
                              <Col span={2}>{Number(subsidyItem.currencyRate).toFixed(2)}</Col>
                              <Col span={2}>{subsidyItem.currencyCode}</Col>
                              <Col span={4}>{this.filterMoney(subsidyItem.amount, queryCurrencyPrecision(subsidyItem.currencyCode), true)}</Col>
                            </Row>
                            <Row>
                              <Col span={21} offset={3}>{subsidyItem.comment}</Col>
                            </Row>
                          </div>
                        )
                      })
                    })}
                  </div>
                )
              })}
            </div>
          )
        }
        break;
      case 'REMARK':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={remarkImg}/>{messages('request.key344'/*行程备注*/)}</Col>
          </Row>
        );
        if (item) {
          let hasRemark = false;
          item.remark && (hasRemark = true);
          Object.keys(item.itineraryDetails || {}).map(key => {
            item.itineraryDetails[key][0].remark && (hasRemark = true)
          });
          hasRemark && (itemContent = (
            <div className="travel-remark">
              {(info.version > 0 || isPreVersion) && item.disabled && (
                <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
              )}
              <div>
                <Tag color="#4B8DFF">{messages('request.key464',{arg1: this.getDifferDays(sDate,item.remarkDate)}/*第 {arg1} 天*/)}</Tag>
                <span className="date">{new Date(item.remarkDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.remarkDate).getDay())}</span>
              </div>
              <div className="remark">
                <div>{item.remark}</div>
                {Object.keys(item.itineraryDetails || {}).map((key, index) => {
                  let remark_title = '';
                  switch(key) {
                    case 'FLIGHT':
                      remark_title = messages('setting.key1855'/*机票*/); //机票
                      break;
                    case 'TRAIN':
                      remark_title = messages('request.key335'/*火车*/); //火车
                      break;
                    case 'SUBSIDIES':
                      remark_title =  messages('request.key336'/*差补*/); //差补
                      break;
                    case 'HOTEL':
                      remark_title =  messages('mcd.tmc.hotel'/*TMC酒店*/); //酒店
                      break;
                    case 'OFFLINE_HOTEL':
                      remark_title =  messages('mcd.cus.hotel'/*非TMC酒店*/); //非TMC酒店
                      break;
                    case 'OTHER':
                      remark_title = messages('request.key346'/*其他交通*/); //其他交通
                      break;
                  }
                  if (item.itineraryDetails[key][0].remark) {
                    return (
                      <Row key={index}>
                        <Col span={2} className="itinerary-type">{remark_title}</Col>
                        <Col span={3}>
                          <span>{item.itineraryDetails[key][0].fromCity || item.itineraryDetails[key][0].cityName}</span>
                          {item.itineraryDetails[key][0].toCity && ' - '}
                          <span>{item.itineraryDetails[key][0].toCity}</span>
                        </Col>
                        <Col span={19}>{item.itineraryDetails[key][0].remark}</Col>
                      </Row>
                    )
                  }
                })}
              </div>
            </div>
          ));
        }
        break;
      case 'HOTEL':
        const vendorsOrderStatus = item && item.travelHotelOrderInfoDTOs && item.travelHotelOrderInfoDTOs.length && item.travelHotelOrderInfoDTOs[0].vendorsOrderStatus;
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={hotelImg}/>{messages('mcd.tmc.hotel'/*TMC酒店*/)}</Col>
            {info.travelApplication && info.travelApplication.hotelUniformBooking && info.travelApplication.hotelBookingClerkName && (
              <Col span={10}>{messages('request.key466',{arg1: info.travelApplication.hotelBookingClerkName}/*由 {arg1} 统一订酒店*/)}</Col>
            )}
          </Row>
        );
        const {excessiveMatters, beyondStandardReason} = item || {};
        item && (itemContent = (
          <div className="hotel">
            {(info.version > 0 || isPreVersion) && item.disabled && (
              <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
            )}
            <div>
              {
                this.getIfValidDuring(sDate,item.fromDate) && <Tag color="#4B8DFF">
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.fromDate)}/*第 {arg1} 天*/)}
                  {' ～ '}
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.leaveDate)}/*第 {arg1} 天*/)}
                </Tag>
              }
              <span className="date">
                {new Date(item.fromDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.fromDate).getDay())} ～ {new Date(item.leaveDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.leaveDate).getDay())}
              </span>
              <span className="day-and-night">
                {messages('request.key467',{arg1: this.getDifferDays(item.fromDate,item.leaveDate)}/*{arg1}天*/)}
                {messages('request.key468',{arg1: this.getDifferDays(item.fromDate,item.leaveDate) - 1}/*{arg1}晚*/)}
              </span>
              {false && item.supplierName && <div className="supplier"><span>{item.supplierName}</span> <img src={item.supplierIconUrl}/></div>}
            </div>
            <Row className="location">
              <Col span={10}>{messages('request.key337'/*目的地*/)}：{item.cityName ? <span className="from">{item.cityName}</span> : messages('request.key490')/*不限*/}</Col>
              {item.approvalNumber && <Col span={10}>{messages('request.key334'/*行程单号*/)}：{item.approvalNumber}</Col>}
              {!isReadOnly && (
                <Col span={4} style={{textAlign: 'right'}}>
                  <TravelBookBtn itinerary={item} type="hotel"/>
                </Col>
              )}

              {
                !!vendorsOrderStatus &&
                <Col span={4} className="detail-tag">
                  <Button type="primary" size="small" className="detail-btn" onClick={() => this.handleRefundZx(item.approvalNumber, 'hotel')}>{messages('dashboard.key128')/*查看详情*/}</Button>
                </Col>
              }
            </Row>
            {item.roomNumber && !!vendorsOrderStatus && <div>
              {item.roomNumber}{messages('request.key347'/*间*/)}
              {false && <span>
                <span className="ant-divider"/>
                {this.props.company.baseCurrency} {item.minPrice ? this.renderMoney(item.minPrice) : messages('request.key330'/*无限制*/)}
                {item.maxPrice ? ` -- ${this.renderMoney(item.maxPrice)}` :
                  item.minPrice ? ` -- ${messages('request.key330'/*无限制*/)}` : ''}
                {` / `}{messages('request.key468',{arg1: ''}/*{arg1}晚*/)}
              </span>}
            </div>}
            {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
            {beyondStandardReason && <Row className="standard-exceed">
              {excessiveMatters && excessiveMatters.length > 0 && <div className="title">{excessiveMatters[0]}</div>}{beyondStandardReason.split(';')[0] && <div>{messages('zx.exceed.reason'/*理由*/)}：{beyondStandardReason.split(';')[0]}</div>}
              {excessiveMatters && excessiveMatters.length > 0 && <div className="title">{excessiveMatters[1]}</div>}{beyondStandardReason.split(';')[1] && <div>{messages('zx.exceed.reason'/*理由*/)}：{beyondStandardReason.split(';')[1]}</div>}
            </Row>}
            <TravelOrderList orderList={item.travelHotelOrderInfoDTOs} type="hotel"/>
          </div>
        ));
        break;
      case 'OFFLINE_HOTEL 111':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={hotelImg}/>{messages('mcd.cus.hotel'/*非TMC酒店*/)}</Col>
          </Row>
        );
        item && (itemContent = (
          <div className="hotel">
            {(info.version > 0 || isPreVersion) && item.disabled && (
              <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
            )}
            <div>
              {
                this.getIfValidDuring(sDate,item.fromDate) && <Tag color="#4B8DFF">
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.fromDate)}/*第 {arg1} 天*/)}
                  {' ～ '}
                  {messages('request.key464',{arg1: this.getDifferDays(sDate,item.leaveDate)}/*第 {arg1} 天*/)}
                </Tag>
              }
              <span className="date">
                {new Date(item.fromDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.fromDate).getDay())} ～ {new Date(item.leaveDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.leaveDate).getDay())}
              </span>
              <span className="day-and-night">
                {messages('request.key467',{arg1: this.getDifferDays(item.fromDate,item.leaveDate)}/*{arg1}天*/)}
                {messages('request.key468',{arg1: this.getDifferDays(item.fromDate,item.leaveDate) - 1}/*{arg1}晚*/)}
              </span>
              {false && item.supplierName && <div className="supplier"><span>{item.supplierName}</span> <img src={item.supplierIconUrl}/></div>}
            </div>
            <Row className="location">
              <Col span={10}>{messages('request.key337'/*目的地*/)}：{item.cityName ? <span className="from">{item.cityName}</span> : messages('request.key490')/*不限*/}</Col>
              {item.approvalNumber && <Col span={10}>{messages('request.key334'/*行程单号*/)}：{item.approvalNumber}</Col>}
              {!isReadOnly && (
                <Col span={4} style={{textAlign: 'right'}}>
                  <TravelBookBtn itinerary={item} type="hotel"/>
                </Col>
              )}
            </Row>
            {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
          </div>
        ));
        break;
      case 'OTHER 111':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={otherImg}/>{messages('request.key346'/*其他交通*/)}</Col>
          </Row>
        );
        item && (itemContent = (
          <div className="other">
            {(info.version > 0 || isPreVersion) && item.disabled && (
              <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
            )}
            <div>
              <Tag color="#4B8DFF">
                {messages('request.key464',{arg1: this.getDifferDays(sDate,item.startDate)}/*第 {arg1} 天*/)}
              </Tag>
              <span className="date">{new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())}</span>
              {item.supplierName && <div className="supplier"><span>{item.supplierName}</span> <img src={item.supplierIconUrl}/></div>}
            </div>
            <div className="location">
              <span className="traffic-type">{item.trafficTypeName}</span>
              <span className="from">{item.fromCity}</span>
              <img src={trafficLineImg}/>
              <span className="to">{item.toCity}</span>
            </div>
            {item.remark && <div className="remark">{messages('common.remark')}：{item.remark}</div>}
          </div>
        ));
        break;
      case 'DIDI':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={carImg}/>{messages('request.key590')/*用车*/}</Col>
          </Row>
        );
        let dateF = null;
        let dateL = null;
        let startF = null;
        let endL = null;
        let startTime = null;
        let endTime = null;
        let trips = [];
        let useCitiesStr = ''; //用车城市
        if (item) {
          if (item.startDate) {
            dateF = moment(item.startDate).format('YYYY.MM.DD') + " " + moment(item.startDate).format('dddd');
          } else {
            dateF = messages('request.key591')/*日期不限*/;
          }
          if (item.endDate) {
            dateL = moment(item.endDate).format('YYYY.MM.DD') + " " + moment(item.endDate).format('dddd');
          } else {
            dateL = messages('request.key591')/*日期不限*/;
          }
          startF = this.getDifferDays(sDate, item.startDate);
          endL = this.getDifferDays(sDate, item.endDate);
          startTime = moment(item.startDate).format('HH:mm');
          endTime = moment(item.endDate).format('HH:mm');
          if (item.trips) {
            trips = JSON.parse(item.trips);
          }
          useCitiesStr = ''; //用车城市
          if ([3, 4, 5].indexOf(item.approvalType) > -1) {
            let useCities = [];
            item.approvalType === 3 && trips.map(trip => {
              useCities.push(trip.destinationCity);
            });
            (item.approvalType === 4 || item.approvalType === 5) && item.travelCarItineraryTrips && item.travelCarItineraryTrips.map(trip => {
              useCities.push(trip.departureCity);
            });
            useCitiesStr = useCities.join('、');
          }
        }
        item && (itemContent = (
          <div className="didi-card-readOnly">
            {(info.version > 0 || isPreVersion) && item.disabled && (
              <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
            )}
            <Row>
              <Col span={5}>
                <Tag color="#4B8DFF">
                  {item.startDate ? messages('request.key464',{arg1: startF}/*第 {arg1} 天*/) : messages('request.key591')/*日期不限*/}
                  {' ～ '}
                  {item.endDate ? messages('request.key464',{arg1: endL}/*第 {arg1} 天*/) : messages('request.key591')/*日期不限*/}
                </Tag>
              </Col>
              <Col span={8}>{`${dateF}~${dateL}`}</Col>
              <Col span={6}>{item.approvalNumber && <span>{messages('request.key334'/*行程单号*/)}：{item.approvalNumber}</span>}</Col>
              <Col offset={1} span={4} style={{textAlign: 'right'}}>
                {[1, 2, 3].indexOf(item.approvalType) > -1 && (
                  <div>
                    {messages('request.key482')/*企业滴滴*/}<img style={{width: 20, height: 20, marginLeft: 10}} src={didiImg}/>
                  </div>
                )}
                {[4, 5].indexOf(item.approvalType) > -1 && (
                  <div> {messages('request.key592')/*携程*/}<img style={{width: 20, height: 20, marginLeft: 10}} src={ctripImg}/>
                  </div>
                )}
              </Col>
            </Row>
            <Row style={{marginTop: 10}} type="flex" align="middle">
              <Col span={6}>
                <span className="font-title">{messages('request.key483')/*用车类型*/}：</span>
                <span className="font-content">{this.getDiDiType(item.approvalType)}</span>
              </Col>
              <Col offset={1} span={17} style={{whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>
                {item.approvalType < 4 && (
                  <span>
                    <span className="font-title">{messages('request.key484')/*用车制度*/}：</span>
                    <span className="font-content">{item.regulationName}</span>
                  </span>
                )}
              </Col>
            </Row>
            <Divider style={{margin: '10px 0'}} />
            {item.approvalType === 1 && (
              <Row>
                <Col span={24}>
                  <span className="font-title">{messages('request.key485')/*行程安排*/}：</span>
                  <span className="font-content-other">{item.departureCity}</span>
                  <img style={{width: 40, margin: '0 10px'}} src={trafficLineImg}/>
                  {trips.map((trip, tripIndex) => {
                    return (
                      <span key={tripIndex}>
                        <span className="font-content-other">{trip.destinationCity}</span>
                        <img style={{width: 40, margin: '0 10px'}} src={trafficLineImg}/>
                      </span>
                    )
                  })}
                  <span className="font-content-other">{item.destinationCity}</span>
                </Col>
              </Row>
            )}
            {item.approvalType === 2 && (
              <Row>
                <Col span={10}>
                  <span className="font-title">{messages('request.key486')/*用车时段*/}：</span>
                  <span className="font-content-other">{startTime}&nbsp;~&nbsp;{endTime}</span>
                </Col>
                <Col offset={2} span={10}>
                  <span className="font-title">{messages('request.key487')/*用车次数*/}：</span>
                  <span className="font-content-other">{item.tripTimes}{messages('request.key488')/*次*/}</span>
                </Col>
              </Row>
            )}
            {item.approvalType === 3 && (
              <Row>
                {!standardEnable && (
                  <Col span={10}>
                    <span className="font-title">{messages('request.key489')/*用车金额*/}：</span>
                    {(item.tripAmount || item.tripAmount === 0) ?
                      <span className="font-content-other">CNY&nbsp;{this.filterMoney(item.tripAmount)}</span> : <span className="font-content-other">{messages('request.key490')/*不限*/}</span>
                    }
                  </Col>
                )}
                <Col offset={standardEnable ? 0 : 2} span={10}>
                  <span className="font-title">{messages('request.key491')/*用车城市*/}：</span>
                  {!!useCitiesStr ?
                    <span className="font-content-other">{useCitiesStr}</span> : <span className="font-content-other">{messages('request.key490')/*不限*/}</span>
                  }
                </Col>
              </Row>
            )}
            {item.approvalType === 4 && (
              <Row gutter={8}>
                {!standardEnable && (
                  <Col span={8}>
                    <span className="font-title">{messages('request.key489')/*用车金额*/}：</span>
                    {(item.tripAmount || item.tripAmount === 0) ?
                      <span className="font-content-other">CNY&nbsp;{this.filterMoney(item.tripAmount)}</span> : <span className="font-content-other">{messages('request.key490')/*不限*/}</span>
                    }
                  </Col>
                )}
                <Col span={8}>
                  <span className="font-title">{messages('request.key491')/*用车城市*/}：</span>
                  {!!useCitiesStr ?
                    <span className="font-content-other">{useCitiesStr}</span> : <span className="font-content-other">{messages('request.key490')/*不限*/}</span>
                  }
                </Col>
                <Col span={8}>
                  <span className="font-title">{messages('request.key487')/*用车次数*/}：</span>
                  {!!item.tripTimes ?
                    <span className="font-content-other">{item.tripTimes}{messages('request.key488')/*次*/}</span> : <span className="font-content-other">{messages('request.key490')/*不限*/}</span>
                  }
                </Col>
              </Row>
            )}
            {item.approvalType === 5 && (
              <Row gutter={8}>
                <Col span={8}>
                  <span className="font-title">{messages('request.key491')/*用车城市*/}：</span>
                  <span className="font-content-other">{useCitiesStr}</span>
                </Col>
                <Col span={8}>
                  <span className="font-title">{messages('request.key593')/*接送类型*/}：</span>
                  <span className="font-content-other">{item.carPickUpTypeDescription}</span>
                </Col>
              </Row>
            )}
          </div>
        ));
        break;
      case 'DINING':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={diningImg}/>{messages('request.key626')/*用餐*/}</Col>
            {info.travelApplication && info.travelApplication.diningUniformBooking && info.travelApplication.diningBookingClerkName && (
              <Col span={10}>{messages('request.key627',{arg1: info.travelApplication.diningBookingClerkName})/*由{arg1}统一订餐*/}</Col>
            )}
          </Row>
        );
        let dateDiningF = null;
        let dateDiningL = null;
        let startDiningF = null;
        let endDiningL = null;
        if (item) {
          if (item.startDate) {
            dateDiningF = moment(item.startDate).format('YYYY.MM.DD') + " " + moment(item.startDate).format('dddd');
          } else {
            dateDiningF = messages('request.key591')/*日期不限*/;
          }
          if (item.endDate) {
            dateDiningL = moment(item.endDate).format('YYYY.MM.DD') + " " + moment(item.endDate).format('dddd');
          } else {
            dateDiningL = messages('request.key591')/*日期不限*/;
          }
          startDiningF = this.getDifferDays(sDate, item.startDate);
          endDiningL = this.getDifferDays(sDate, item.endDate);
        }
        item && (itemContent = (
          <div className="dining-card-readOnly">
            {(info.version > 0 || isPreVersion) && item.disabled && (
              <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
            )}
            <Row>
              <Col span={5}>
                <Tag color="#4B8DFF">
                  {item.startDate ? messages('request.key464',{arg1: startDiningF}/*第 {arg1} 天*/) : messages('request.key591')/*日期不限*/}
                  {' ～ '}
                  {item.endDate ? messages('request.key464',{arg1: endDiningL}/*第 {arg1} 天*/) : messages('request.key591')/*日期不限*/}
                </Tag>
              </Col>
              <Col span={8}>{`${dateDiningF}~${dateDiningL}`}</Col>
              <Col span={6}>{item.approvalNumber && <span>{messages('request.key334'/*行程单号*/)}：{item.approvalNumber}</span>}</Col>
            </Row>
            <Row style={{marginTop: 10}} type="flex" align="middle">
              <Col span={6}>
                <span className="font-title">{messages('request.key634')/*用餐类型*/}：</span>
                <span className="font-content">{item.diningSceneDTO.name}</span>
              </Col>
            </Row>
            <Divider style={{margin: '10px 0'}} />
            <Row gutter={8}>
              {item.cityCode && (
                <Col span={8}>
                  <span className="font-title">{messages('request.key629')/*用餐城市*/}：</span>
                  <span className="font-content-other">{item.cityName}</span>
                </Col>
              )}
              {item.standardAmount && (
                <Col span={8}>
                  <span className="font-title">{messages('request.key630')/*用餐标准*/}：</span>
                  <span className="font-content-other">CNY&nbsp;{this.filterMoney(item.standardAmount)}</span>
                </Col>
              )}
            </Row>
          </div>
        ));
        break;
      case 'otherItinerarys':
        header = (
          <Row className={`itinerary-header ${window.ISIE9 ? 'itinerary-header-ie9' : ''}`} onClick={() => this.hideAndShow(key)}>
            {window.ISIE9 && (
              <Col span={1} offset={1}>
                {itinerary[key].show && (<Icon type="down" />)}
                {!itinerary[key].show && (<Icon type="right" />)}
              </Col>
            )}
            <Col span={5}><img src={otherImg}/>{messages('request.key412'/*其他*/)}</Col>
          </Row>
        );
        if(item) {
          const filterMoney = this.filterMoney;
          const {itineraryKey, itineraryName, idx, currency, fromDate, leaveDate, cityName, hotelName, star, hotelType, optionalReason, roomType, totalPrice,
            fromCity, toCity, departureDate, cabin, discount, taxTotalAmount, baseCurrencyAmount, actualCurrencyRate = '', companyCurrencyRate,
            travelSubsidiesRequestItemDTOs, totalAmount, baseCurrency, currencyCodeAmountMap, remark, expenseType } = item;
          const _dateF = moment(fromDate).format('YYYY.MM.DD') + " " + moment(fromDate).format('dddd');
          const _dateL = moment(leaveDate).format('YYYY.MM.DD') + " " + moment(leaveDate).format('dddd');
          const _departureDateL = moment(departureDate).format('YYYY.MM.DD') + ' ' + moment(departureDate).format('dddd');
          const _night = travelUtil.calculateDate(fromDate, leaveDate) - 1;
          const titleImgUrl = travelUtil.setItineraryTypeImg(itineraryKey);
          const showForeignCcy = currency && baseCcy !== currency;
          let startDate = new Date(item.startDate);
          let endDate = new Date(item.endDate);
          let currentCodeMap = '';
          let codeNum = 0;//币种数；如果仅有一种币种且为本位币，则不显示后面的币种连加（currentMap）
          let codeStr = '';//第一种币种
          for (let key in currencyCodeAmountMap) {
            currentCodeMap = currentCodeMap + key + filterMoney(currencyCodeAmountMap[key], queryCurrencyPrecision(key), true) + " + ";
            codeNum++;
            if(codeNum === 1){
              codeStr = key;
            }
          }
          currentCodeMap = currentCodeMap.substr(0, currentCodeMap.length - 2);
          if(codeNum === 1 && codeStr === baseCurrency){
            currentCodeMap = '';
          }
          let requestDTOs = travelSubsidiesRequestItemDTOs || [];
          switch (itineraryKey) {
            case 'airline':
              itemContent = (
                <div key={itineraryName + idx} className="flight">
                  <div><span><img style={{marginTop: -4}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                  <Row>
                    <Col span={20} className="type-city-city">
                      <Row className="locations">
                        <span style={{marginRight: 6}}>{fromCity}</span>
                        <span className="line-wrapper">
                          <img src={traffic_line}/>
                          <span className="line-str"></span>
                        </span>
                        <span style={{marginLeft: 6}}>{toCity}</span>
                      </Row>
                    </Col>
                  </Row>
                  <div>
                    <span className="other-label">{messages('components.key393'/*出发日期*/)}</span>：
                    <span className="other-value">{_departureDateL}</span>
                  </div>
                  <div>
                    <span className="other-label">{messages('mcd.cabin.discount'/*舱位及折扣*/)}</span>：
                    <span className="other-value">{cabin} {!!discount && <span>| {discount}</span>}</span>
                  </div>
                  <div>
                    <span className="other-label">{messages('mcd.custom.hotel.order.amt'/*含税总金额*/)}</span>：
                    <span className="other-value">{currency} {filterMoney(taxTotalAmount, queryCurrencyPrecision(currency))}&nbsp;&nbsp;</span>
                    {
                      !!showForeignCcy && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{actualCurrencyRate && actualCurrencyRate.toFixed(2)} {baseCcy} {filterMoney(baseCurrencyAmount, baseCcy)}
                      </span>
                    }
                  </div>
                </div>
              );
              break;
            case 'offlineHotel':
              itemContent = (
                <div key={itineraryName + idx} className="hotel">
                  <div><span><img style={{marginTop: -4}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                  <Row>
                    <Col span={20} className="type-city-city"><span>{cityName}</span></Col>
                  </Row>
                  <div>
                    <span className="other-label">{messages('financial-management.key56'/*入住时间*/)}</span>：
                    <span className="other-value">{`${_dateF}~${_dateL}`} {`${messages('request.key470',{arg1:_night}/*{arg1}晚*/)}`}</span>
                  </div>
                  <div>
                    <span className="other-label">{messages('financial-management.key728'/*酒店名称*/)}</span>：
                    <span className="other-value">{hotelName} {!!star && <span>| {messages(`mcd.custom.hotel.star.level${Number(star)}`)}</span>}</span>
                  </div>
                  <div>
                    <span className="other-label">{messages('mcd.hotel.room.type'/*酒店类型及房型*/)}</span>：
                    <span className="other-value">{messages(`mcd.${hotelType}`)} {roomType && <span>| {roomType}</span>}</span>
                  </div>
                  {
                    !!optionalReason && <div>
                      <span className="other-label">{messages('mcd.self.reason'/*自选酒店理由*/)}</span>：
                      <span className="other-value">{optionalReason}</span>
                    </div>
                  }
                  <div>
                    <span className="other-label">{messages('mcd.custom.hotel.order.amt'/*含税总金额*/)}</span>：
                    <span className="other-value">{currency} {filterMoney(totalPrice, queryCurrencyPrecision(currency))}&nbsp;&nbsp;</span>
                    {
                      !!showForeignCcy && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{actualCurrencyRate && actualCurrencyRate.toFixed(2)} {baseCcy} {filterMoney(baseCurrencyAmount, baseCcy)}
                      </span>
                    }
                  </div>
                </div>
              );
              break;
            case 'urban':
              itemContent = (
                <div key={itineraryName + idx} className="flight">
                  <div><span><img style={{marginTop: -4, width: '15px'}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                  <div>
                    <span className="other-label">{messages('mcd.total.tax.amt'/*含税总金额*/)}</span>：
                    <span className="other-value">{currency} {filterMoney(taxTotalAmount, queryCurrencyPrecision(currency))}&nbsp;&nbsp;</span>
                    {
                      !!showForeignCcy && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{actualCurrencyRate && actualCurrencyRate.toFixed(2)} {baseCcy} {filterMoney(baseCurrencyAmount, baseCcy)}
                      </span>
                    }
                  </div>
                </div>
              );
              break;
            case 'water':
              itemContent = (
                <div key={itineraryName + idx} className="flight">
                  <div><span><img style={{marginTop: -4, width: '15px'}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                  <Row>
                    <Col span={20} className="type-city-city">
                      <Row className="locations">
                        <span style={{marginRight: 6}}>{fromCity}</span>
                        <span className="line-wrapper">
                          <img src={traffic_line}/>
                          <span className="line-str"></span>
                        </span>
                        <span style={{marginLeft: 6}}>{toCity}</span>
                      </Row>
                    </Col>
                  </Row>
                  <div>
                    <span className="other-label">{messages('components.key393'/*出发日期*/)}</span>：
                    <span className="other-value">{_departureDateL}</span>
                  </div>
                  <div>
                    <span className="other-label">{messages('mcd.total.tax.amt'/*含税总金额*/)}</span>：
                    <span className="other-value">{currency} {filterMoney(taxTotalAmount, queryCurrencyPrecision(currency))}&nbsp;&nbsp;</span>
                    {
                      !!showForeignCcy && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{actualCurrencyRate && actualCurrencyRate.toFixed(2)} {baseCcy} {filterMoney(baseCurrencyAmount, baseCcy)}
                      </span>
                    }
                  </div>
                </div>
              );
              break;
            case 'subsidy':
              if (item && subsidyVersion === 2) {
                itemContent = (
                  <div className="subsidy">
                    {(info.version > 0 || isPreVersion) && item.disabled && (
                      <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
                    )}
                    <div><span><img style={{marginTop: -4}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                    <div>
                      <span className="other-label">{messages('request.key314'/*出差日期*/)}</span>：
                      <span className="other-value">{new Date(item.startDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.startDate).getDay())} ～ {new Date(item.endDate).format('yyyy.MM.dd')} {this.getWeed(new Date(item.endDate).getDay())}</span>
                    </div>
                    <div>
                      <span className="other-label">{messages('mcd.total.tax.amt'/*含税总金额*/)}</span>：
                      <span className="other-value">{baseCcy} {this.renderMoney(item.totalAmount || 0)}&nbsp;&nbsp;</span>
                    </div>

                    {expenseType && expenseType.length ? (
                      expenseType.map(expense => {
                        return (
                          <div key={expense.expenseTypeOID} className="expense-item">
                            <div>
                              {expense.expenseTypeName} {baseCcy} {expense.amount}{messages('request.key338'/*/人/天*/)},
                              {expense.usernames.length}{messages('request.key339'/*人*/)},
                              {messages('request.key461',{arg1: this.getDifferDays(item.startDate,item.endDate)}/*共{arg1}天*/)}
                            </div>
                            <div>{expense.usernames.join(', ')}</div>
                          </div>
                        )
                      })
                    ) : <div>{messages('request.key340'/*该城市无差补*/)}</div>}
                    {remark && <div className="remark">{messages('common.remark')}：{remark}</div>}
                  </div>
                )
              } else if (item && subsidyVersion === 3) {
                itemContent = (
                  <div className="subsidy">
                    {(info.version > 0 || isPreVersion) && item.disabled && (
                      <img src={language.code === 'zh_cn' ? disabledImg : disabledEnImg} className="disabled-img"/>
                    )}
                    <div><span><img style={{marginTop: -4}} src={titleImgUrl}/>&nbsp;{itineraryName}</span></div>
                    <div>
                      <span className="other-label">{messages('request.key314'/*出差日期*/)}</span>：
                      <span className="other-value">{startDate.format('yyyy.MM.dd')} {this.getWeed(startDate.getDay())} ～ {endDate.format('yyyy.MM.dd')} {this.getWeed(endDate.getDay())}</span>
                    </div>
                    <div>
                      <span className="other-label">{messages('mcd.total.tax.amt'/*含税总金额*/)}</span>：
                      <span className="other-value">{baseCurrency} {filterMoney(item.totalBaseCurrencyAmount, queryCurrencyPrecision(baseCurrency), true)}&nbsp;&nbsp;</span>
                      {
                        !!showForeignCcy && <span className="other-value">
                        {messages('components.key55'/*汇率*/)}：{actualCurrencyRate && actualCurrencyRate.toFixed(2)} {currentCodeMap}
                      </span>
                      }
                    </div>
                    {remark && <div className="remark">{messages('common.remark')}：{remark}</div>}
                    {requestDTOs.map((subsidy, itemIndex) => {
                      let subsidyItemIndex = 0;
                      let subCurrency = [];
                      Object.keys(subsidy.currencyCodeAmountMap || {}).map(currency => {
                        currency !== baseCurrency && subCurrency.push(`${currency} ${this.filterMoney(subsidy.currencyCodeAmountMap[currency], queryCurrencyPrecision(currency), true)}`)
                      });
                      return (
                        <div className="user-subsidy-items" key={itemIndex}>
                          <Row className="title-show">
                            <Col span={6} className="avatar-info">
                              <div>
                                <span className="other-label">{messages('common.applicant'/*申请人*/)}</span>：
                                <span className="other-value">{subsidy.fullName}</span>
                              </div>
                            </Col>
                            <Col span={16} className="user-total-info">
                              {subCurrency.length > 0 && <Tooltip placement="top" title={subCurrency.join(' + ')}>{subCurrency.join(' + ')}</Tooltip>}
                              <div>{subsidy.baseCurrencyCode} {this.filterMoney(subsidy.baseCurrencyAmount, queryCurrencyPrecision(subsidy.baseCurrencyCode), true)}</div>
                            </Col>
                            <Col span={2} className="up-down-icon">
                              <Icon type={subsidy.showItem ? 'up-circle-o' : 'down-circle-o'}
                                    onClick={() => this.handleSubsidyItemShow(item.travelSubsidiesRequestOID, itemIndex, !subsidy.showItem)}/>
                            </Col>
                          </Row>
                          {subsidy.showItem && subsidy.travelSubsidiesItemMap.map(subsidiesItem => {
                            return subsidiesItem.travelSubsidiesRequestItemDetailDTOs.map(subsidyItem => {
                              subsidyItemIndex ++;
                              return (
                                <div className={`subsidy-item ${subsidyItemIndex % 2 ? 'subsidy-item-bg' : ''}`} key={subsidyItem.travelSubsidiesDetailsOID}>
                                  <Row>
                                    <Col span={3}>{moment(subsidiesItem.subsidiesDate).format('YYYY-MM-DD')}</Col>
                                    <Col span={13}>
                                      <Tooltip placement="topLeft" title={subsidyItem.expenseTypeName}>
                                        <span className="expense-type-name">{subsidyItem.expenseTypeName}</span>
                                      </Tooltip>
                                      {(subsidy.duplicateSubsidiesOIDs || []).map(duplicateOID => {
                                        if (duplicateOID === subsidyItem.travelSubsidiesDetailsOID) {
                                          return <Tag color="#bababa" style={{verticalAlign:'top'}}>{messages('request.key341'/*重复*/)}</Tag>
                                        }
                                      })}
                                      <div>
                                        {messages('request.key342'/*企业汇率*/)}：{Number(subsidyItem.baseCurrencyRate).toFixed(2)}
                                        {subsidyItem.currencyRate - subsidyItem.baseCurrencyRate >= 0 ? ' + ' : ' - '}
                                        {(subsidyItem.currencyRate - subsidyItem.baseCurrencyRate).toFixed(2) * 100}%
                                        ，{messages('request.key343'/*原金额*/)}：{this.filterMoney(subsidyItem.baseAmount, queryCurrencyPrecision(subsidyItem.currencyCode), true)}
                                      </div>
                                    </Col>
                                    <Col span={2}>{Number(subsidyItem.currencyRate).toFixed(2)}</Col>
                                    <Col span={2}>{subsidyItem.currencyCode}</Col>
                                    <Col span={4}>{this.filterMoney(subsidyItem.amount, queryCurrencyPrecision(subsidyItem.currencyCode), true)}</Col>
                                  </Row>
                                  <Row>
                                    <Col span={21} offset={3}>{subsidyItem.comment}</Col>
                                  </Row>
                                </div>
                              )
                            })
                          })}
                        </div>
                      )
                    })}
                  </div>
                )
              }
              break;
            default:
              result = '';
              break;
          }
        }
        break;
      default:
        header = ''
    }
    return item ? itemContent : header
  };
  render() {
    const { loading, itinerary, isShowZxRecommend, isShowZxRecommendConfirm, selectedTickets, ticketIssuedFail, failedList, targetFlightForUpd } = this.state;
    const { info } = this.props;
    const otherItineraryKeys = ['NO_TMC_AIRLINE', 'OFFLINE_HOTEL', 'URBAN_TRAFFIC', 'WATER_TRAFFIC', 'SUBSIDIES'];
    return (
      <div className="travel-information tab-container">
        <h3 className="sub-header-title">{messages('request.key715'/*行程明细*/)}</h3>
        <Spin spinning={loading}>
          {Object.keys(itinerary || {}).map(key => {
            itinerary[key] = itinerary[key] || [];
            let itemInfo = window.ISIE9 ? (
              <div>
                {this.renderItineraryItem(key)}
                {itinerary[key].show && itinerary[key].map((item, index) => {
                  if (item) {
                    return <div className="container" key={index}>{this.renderItineraryItem(key, item)}</div>
                  }
                })}
              </div>) : (
              <Collapse key={key}>
                <Panel header={this.renderItineraryItem(key)}>
                  {itinerary[key].map((item, index) => {
                    if (item) {
                      return <div className="container" key={index}>{this.renderItineraryItem(key, item)}</div>
                    }
                  })}
                </Panel>
              </Collapse>);
            if (itinerary[key].length) {
              if (key === 'REMARK') {
                //task#40762：PC/移动端申请单页面行程备注调整
                // let hasRemark = false;
                // itinerary[key].map(item => {
                //   item.remark && (hasRemark = true);
                //   Object.keys(item.itineraryDetails || {}).map(type => {
                //     item.itineraryDetails[type][0].remark && (hasRemark = true)
                //   })
                // });
                // if (hasRemark) return itemInfo
              } else if (otherItineraryKeys.indexOf(key) < 0) {
                return itemInfo
              }
            }
          })}
        </Spin>

        {
          ticketIssuedFail && <SlideFrame title={messages('zx.recommend.airline'/*推荐航班*/)}
                                           content={ZxRecommend}
                                           show={isShowZxRecommend}
                                           onClose={this.setZxRecommendClose}
                                           params={{info, failedList, isShowZxRecommend, targetFlightForUpd}}
                                          afterClose={(pra)=>this.afterZxRecommendClose(pra)}/>
        }

        {
          ticketIssuedFail && <SlideFrame title={messages('zx.recommend.airline'/*推荐航班*/)}
                                              content={ZxRecommendConfirm}
                                              show={isShowZxRecommendConfirm}
                                              onClose={this.setZxRecommendCloseConfirm}
                                              params={{info, selectedTickets}}
                                              afterClose={(pra)=>this.afterZxRecommendCloseConfirm(pra)}/>
        }
      </div>
    )
  }
}

TravelInformation.propTypes = {
  applicationOID: React.PropTypes.string,
  latestApplicationOID: React.PropTypes.string,
  info: React.PropTypes.object,
  customFormPropertyMap: React.PropTypes.object,
  controlFields: React.PropTypes.object,
  isPreVersion: React.PropTypes.bool, //是否为最新版本的上一版本
  isReadOnly: React.PropTypes.bool, //是否是只读状态，不展示预订按钮
  approving: React.PropTypes.bool, //是否待审批
};

function mapStateToProps(state) {
  return {
    company: state.login.company,
    user: state.login.user,
    profile: state.login.profile,
    language: state.main.language,
    authToken: state.main.authToken
  }
}

const wrappedLoanRepayment = Form.create()(TravelInformation);

export default connect(mapStateToProps)(wrappedLoanRepayment)
